/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2013/04/30
* File: RenderContext.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#pragma once

#include <core/Singleton.h>
#include "TextureManager.h"
#include "RenderSystem.h"

namespace HY
{

class RenderContext : public Singleton<RenderContext>
{
public:
	RenderContext();
	~RenderContext();

	bool init();
	bool uninit();

	TextureManager* getTexMgr() const;
	RenderSystem* getRenderSys() const;

protected:
	TextureManager*		tex_buffer_mgr_;
	RenderSystem*		render_sys_;
};

inline RenderSystem* rc_getRenderSys() 
{
	return RenderContext::getSingletonPtr()->getRenderSys();
}

inline TextureManager* rc_getTexMgr()
{
	return RenderContext::getSingletonPtr()->getTexMgr();
}

}


